﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Golf.WebUI.App_code
{
    /// <summary>
    ///  验证登陆类  
    /// </summary>
    public class ValidateLogin : System.Web.UI.Page
    {
        protected override void OnPreInit(EventArgs e)
        {
            Object obj = CookiesHelper.GetCookie("_AdminLogin");
            if (obj == null || obj.ToString() == "")
            {
                // HttpContext.Current.Request.Url.Host + 
                //HttpContext.Current.Request.ApplicationPath 
                Response.Write("<script>alert('您未登录或者登录超时,请登录……');window.location.href='http://" + HttpContext.Current.Request.Url.Host + "/AdminShow/Admin/Login.aspx';</script>");
            }
        }
    }

}
